/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Faculty of informatics, Burapha University 01
 * License Type: Purchased
 */
package cn.imvc.app.entities;

import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="logging")
public class Logging implements Serializable {
	public Logging() {
	}
	
	private int id;
	
	private java.util.Date logDate;
	
	private String logLevel;
	
	private String location;
	
	private String message;
	
	private String uname;
	
	public void setId(int value) {
		this.id = value;
	}
	
	@Column(name="id", nullable=false)	
	@Id	
	@GeneratedValue(generator="CN_IMVC_APP_ENTITIES_LOGGING_ID_GENERATOR")	
	@org.hibernate.annotations.GenericGenerator(name="CN_IMVC_APP_ENTITIES_LOGGING_ID_GENERATOR", strategy="identity")	
	public int getId() {
		return id;
	}
	
	@Transient	
	public int getORMID() {
		return getId();
	}
	
	public void setLogDate(java.util.Date value) {
		this.logDate = value;
	}
	
	@Column(name="log_date", nullable=true)	
	@Temporal(TemporalType.TIMESTAMP)	
	public java.util.Date getLogDate() {
		return logDate;
	}
	
	public void setLogLevel(String value) {
		this.logLevel = value;
	}
	
	@Column(name="log_level", nullable=true, length=255)	
	public String getLogLevel() {
		return logLevel;
	}
	
	public void setLocation(String value) {
		this.location = value;
	}
	
	@Column(name="location", nullable=true, length=255)	
	public String getLocation() {
		return location;
	}
	
	public void setMessage(String value) {
		this.message = value;
	}
	
	@Column(name="message", nullable=true, length=255)	
	public String getMessage() {
		return message;
	}
	
	public void setUname(String value) {
		this.uname = value;
	}
	
	@Column(name="uname", nullable=true, length=20)	
	public String getUname() {
		return uname;
	}
	
	public String toString() {
		return toString(false);
	}
	
	public String toString(boolean idOnly) {
		if (idOnly) {
			return String.valueOf(getId());
		}
		else {
			StringBuffer sb = new StringBuffer();
			sb.append("Logging[ ");
			sb.append("Id=").append(getId()).append(" ");
			sb.append("LogDate=").append(getLogDate()).append(" ");
			sb.append("LogLevel=").append(getLogLevel()).append(" ");
			sb.append("Location=").append(getLocation()).append(" ");
			sb.append("Message=").append(getMessage()).append(" ");
			sb.append("Uname=").append(getUname()).append(" ");
			sb.append("]");
			return sb.toString();
		}
	}
	
}
